const pool = require("../db/conn");
exports.selectCount = async function (sql,params=[]) {
    let countSql = "select count(0) total from ( "+ sql +" ) as temp ";
    let conn = await pool.getConnection();
    let [result] = await conn.execute(countSql,params);
    conn.release();
    return result[0];
}